/**
 * This file is part of the FlexiTimer project.
 * 
 * Author: Florian Arndt <f.aarndt@web.de>
 *  	   Clemens Teichmann <>
 *
 * http://code.google.com/p/flexitimer/ 
 */

package flexitimer_client.calc;

import java.awt.event.*;
import javax.swing.*;


public class ExitAction extends AbstractAction
{
  //---------------------------------------------------------------------------
  //--- instance-variable(s) --------------------------------------------------
  //---------------------------------------------------------------------------
	private static ExitAction  instance  = null;

	//---------------------------------------------------------------------------
  //--- constructor(s) --------------------------------------------------------
  //---------------------------------------------------------------------------
  private ExitAction()
  {
  	super("Beenden");
  }

  //---------------------------------------------------------------------------
  //--- private/public  method(s) ---------------------------------------------
  //---------------------------------------------------------------------------
  public static ExitAction getInstance()
  {
  	if (instance==null)
  	{
  		instance = new ExitAction();
  	}
  	return instance;
  }

  //---------------------------------------------------------------------------
  //--- overwritten from 'AbstractAction' -------------------------------------
  //---------------------------------------------------------------------------
  public void actionPerformed(ActionEvent e)
  {  	
  	try {Thread.sleep(100); } catch (InterruptedException ignore) {}
		
  	System.exit(0);
  }
}
